/*
 *  Copyright 2012 Anton Van Zyl. http://code.google.com/p/java-swiss-knife/
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */
package com.knife.web.net;

/**
 * This is the ContentType in a http header used in downloads of files.<br/>
 * Supported files are:
 * <ul >
 * <li>CSV - text/csv</li>
 * <li>PDF - application/pdf</li>
 * <li>Default - text/plain</li>
 * <li>Application_XFiller - application/x-filler</li>
 * </ul>
 * 
 * <br/>
 * <br/>
 * Please visit <a
 * href="http://code.google.com/p/java-swiss-knife/">Java-Swiss-Knife</a> and
 * comment, rate, contribute or raise a issue/enhancement for my library. <br/>
 * 
 * @author Anton Van Zyl
 * 
 */
public enum ContentType {

	/**
	 * text/csv
	 */
	CSV("text/csv"),
	/**
	 * application/pdf
	 */
	PDF("application/pdf"),
	/**
	 * test/plain
	 */
	DEFAULT("text/plain"),
	/**
	 * application.x-filler
	 */
	APPLICATION_XFILLER("application/x-filler");

	private String typeString;

	private ContentType(String typeString) {
		this.typeString = typeString;
	}

	/**
	 * Gets the string representing the type in a download
	 * 
	 * @return the String type define used in header of response message
	 */
	public String getTypeString() {
		return typeString;
	}
}
